package com.Exception;

public class Main65 {
    public static void main(String[] args)throws Exception{
        int n=20,result=0;
        try{
            result=n/0;
            System.out.println("result="+result);
        }catch(ArithmeticException ex){
            System.out.println("触发异常："+ex);
        }
        try {
            throw new NumberFormatException();
        }
        catch(NumberFormatException ex1) {
            System.out.println("手动抛出链试异常 : "+ex1);
        }
    }
}
